import request from "../utils/request"

// 创建订单：
export const createOrderRequest = (data) =>
  request({
    url: '/api/public/v1/my/orders/create',
    method: 'post',
    data
  })

// 查看订单支付状态
export const checkOrderRequest = (order_number) =>
  request({
    url: '/api/public/v1/my/orders/chkOrder',
    method: 'post',
    data: {
      order_number
    }
  })

// 历史订单查询
export const checkAllOrderRequest = (type) =>
  request({
    url: '/api/public/v1/my/orders/all',
    method: 'get',
    data: {
      type
    }
  })

// 获取支付参数
export const getUnifiedOrderRequest = (order_number) =>
  request({
    url: '/api/public/v1/my/orders/req_unifiedorder',
    method: 'post',
    data: {
      order_number
    }
  })
